/*
 * Copyright (C) 2011 JiangHongTiao
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package sk.lieskove.jianghongtiao.websearch.persistence;

import org.apache.log4j.Logger;
import sk.lieskove.jianghongtiao.common.utils.PropertiesUtils;

import javax.persistence.*;
import java.io.Serializable;
import sk.lieskove.jianghongtiao.websearch.enums.DocumentType;

/**
 * 
 * @author xjuraj e-mail: jjurco.sk_gmail.com
 */
@Entity
public class ClassificationStorage implements Serializable {
    @Id
    @GeneratedValue(strategy= GenerationType.SEQUENCE)
    private Long id;
    @Enumerated(EnumType.STRING)
    private DocumentType documentType;
    @OneToOne(fetch= FetchType.EAGER, optional=true)
    WebSearchResponse webSearchResponse;
    
    @Transient
    private transient Logger log = Logger.getLogger(ClassificationStorage.class);
    @Transient
    private transient PropertiesUtils pu = new PropertiesUtils(ClassificationStorage.class);

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public WebSearchResponse getWebSearchResponse() {
        return webSearchResponse;
    }

    public void setWebSearchResponse(WebSearchResponse webSearchResponse) {
        this.webSearchResponse = webSearchResponse;
    }

    public DocumentType getDocumentType() {
        return documentType;
    }

    public void setDocumentType(DocumentType documentType) {
        this.documentType = documentType;
    }
}
